<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href="https://cdn.bootcdn.net/ajax/libs/minireset.css/0.0.2/minireset.min.css" rel="stylesheet" />
  </head>
  <body>
    <style>
      body {
        width: 100vw;
        height: 100vh;
      }
      div {
        width: 200px;
        height: 200px;
        opacity: 0;
        /* display: none; */
        background-color: royalblue;
        transition-duration: 2s;
      }
      body:hover div {
        height: 300px;
        opacity: 1;
        /* display: block; */
      }
    </style>
    <div></div>
  </body>
</html>
